home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / LINUX / WAIT.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  570b  |  34 lines

  1. #ifndef _LINUX_WAIT_H
  2. #define _LINUX_WAIT_H
  3.  
  4. #define WNOHANG        0x00000001
  5. #define WUNTRACED    0x00000002
  6.  
  7. #define __WCLONE    0x80000000
  8.  
  9. #ifdef __KERNEL__
  10.  
  11. #include <asm/page.h>
  12.  
  13. struct wait_queue {
  14.     struct task_struct * task;
  15.     struct wait_queue * next;
  16. };
  17.  
  18. #define WAIT_QUEUE_HEAD(x) ((struct wait_queue *)((x)-1))
  19.  
  20. static inline void init_waitqueue(struct wait_queue **q)
  21. {
  22.     *q = WAIT_QUEUE_HEAD(q);
  23. }
  24.  
  25. static inline int waitqueue_active(struct wait_queue **q)
  26. {
  27.     struct wait_queue *head = *q;
  28.     return head && head != WAIT_QUEUE_HEAD(q);
  29. }
  30.  
  31. #endif /* __KERNEL__ */
  32.  
  33. #endif
  34.